package io.gitee.zhangbinhub.admin.common.base

import io.gitee.zhangbinhub.acp.core.common.CalendarTools
import org.joda.time.DateTime

abstract class BaseController {

    /**
     * long 转为日期，仅保留年月日
     *
     * @param time 时间
     * @return 日期对象
     */
    protected fun longToDate(time: Long): DateTime {
        val dateTime = CalendarTools.getCalendar(time)
        return dateTime.withMillisOfDay(0)
    }
}